package com.aau.edu.controller;

import com.aau.edu.dao.entity.Dept;
import com.aau.edu.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController {
    @Autowired
    private DeptService deptService;

    @GetMapping("/api/v1/getAllDepts")
    public String getAllDepts() {
        List<Dept> allDepts = deptService.getAllDepts();
        System.out.println(allDepts);
        return "success";
    }
}
